]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Bug 589086 - Fix non-integer positioning in altTab
authorColin Walters <walters@verbum.org>
Sun, 2 Aug 2009 19:49:10 +0000 (15:49 -0400)
committerColin Walters <walters@verbum.org>
Wed, 5 Aug 2009 15:43:54 +0000 (11:43 -0400)
Non-integer makes fonts look awful.  Fix this by rounding
down.

js/ui/altTab.js

index 731ee2b2b07a1974ccc7ef785484aeae3bac55c5..f11ea3db1baba955040312f1f2f44fe19183b36a 100644 (file)
@@ -62,7 +62,7 @@ AltTabPopup.prototype = {
         let labelbox = new Big.Box({ background_color: POPUP_INDICATOR_COLOR,
                                      corner_radius: POPUP_GRID_SPACING / 2,
                                      padding: POPUP_GRID_SPACING / 2 });
-        labelbox.append(this._label, Big.BoxPackFlags.EXPAND);
+        labelbox.append(this._label, Big.BoxPackFlags.NONE);
         let lcenterbox = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL,
                                        x_align: Big.BoxAlignment.CENTER,
                                        width: POPUP_LABEL_MAX_WIDTH + POPUP_GRID_SPACING });
@@ -155,8 +155,8 @@ AltTabPopup.prototype = {
                                        transition: "easeOutQuad" });
 
        this.actor.show_all();
-        this.actor.x = (global.screen_width - this.actor.width) / 2;
-        this.actor.y = (global.screen_height - this.actor.height) / 2;
+        this.actor.x = Math.floor((global.screen_width - this.actor.width) / 2);
+        this.actor.y = Math.floor((global.screen_height - this.actor.height) / 2);
 
         this.select(initialSelection);
     },